Bank of America revolutionized the banking industry by spearheading the development of the Remington Rand UNIVAC-1 and the Electronic Recording Method of Accounting (“ERMA”), which were computer systems developed in the 1950s. ERMA's primary function was to process consumer checks, which because of volume could not practically be processed manually. According to Bank of America, ERMA was one of the world's first successful computers for business applications. Since ERMA, computers have played an indispensable role in the financial industry (e.g., accounting, banking, and investing). Indeed, the automation of its business processes helped propel Bank of America from its start in San Francisco in 1904 to be the largest wealth management corporation in the world.
As globalization of manufacturing and financing increases, the “supply chain” for manufactured products is becoming increasingly complex and distributed. For example, the supply chain for the manufacturing of computers includes mines to extract elements and compounds (e.g., rare earth metals used in central processing units), factories to generate plastics (e.g., for housing), factories to assemble components, shipping companies to transport components, energy plants to deliver energy, and so on with ultimate delivery of computers to consumers. The purchasers and suppliers of a supply chain can be located throughout the world. A difficulty with a supply chain, especially if it is worldwide, is that a purchaser or a supplier may not be able to fulfill the terms of their agreement. For example, a supplier who is provided partial payment may not deliver any goods or services (referred to as products) to the purchaser. Alternatively, if the products are delivered, the purchaser may not make the final payment. In some cases, a supplier may use the agreement as collateral to borrow money from a bank to help fund the manufacturing of the goods or the providing of the service until payment is received from the purchaser when the terms of the agreement are fulfilled. In some cases, an unscrupulous supplier may use the agreement as collateral to borrow money from multiple banks that are unaware that the supplier has borrowed from other banks. In such a case, the banks are at risk of not being paid back.
If the terms of an agreement cannot be fulfilled, one of the parties to the agreement or a third party relying on the agreement as collateral may need to resort to a court system for remedy. In some jurisdictions, however, the parties may not have an effective remedy because, for example, the court systems are not well-developed or may tend to favor locals. Because of this difficulty, parties may be hesitant to deal with parties from such jurisdictions even though the majority of the purchasers and suppliers are able to and do fulfill the terms of their agreements. It would be desirable to have a technology that would help ensure that parties can effectively deal with parties throughout the world while reducing risk in the event an agreement is breached.
As in the 1950s, revolutionary changes are currently taking place in the financial industry, with the current changes based on blockchain and distributed ledger technologies. Blockchain and distributed ledger technologies have their roots in the bitcoin system, which was developed to allow electronic cash to be transferred directly from one party to another without going through a financial institution, as described in the white paper entitled “Bitcoin: A Peer-to-Peer Electronic Cash System” by Satoshi Nakamoto. A bitcoin (e.g., an electronic coin) is represented by a chain of transactions that transfers ownership from one party to another party. To transfer ownership of a bitcoin, a new transaction is generated and added to a stack of transactions in a block. The new transaction, which includes the public key of the new owner, is digitally signed by the owner with the owner's private key to transfer ownership to the new owner as represented by the new owner's public key. The public and private key pair of a party is stored in a “wallet.” Once the block is full, the block is “capped” with a block header that is a hash digest of all the transaction identifiers within the block. The block header is recorded as the first transaction in the next block in the chain, creating a mathematical hierarchy called a “blockchain.” To verify the current owner, the blockchain of transactions can be followed to verify each transaction from the first transaction to the last transaction. The new owner need only have the private key that matches the public key of the transaction that transferred the bitcoin. The blockchain creates a mathematical proof of ownership in an entity represented by a security identity (e.g., a public key), which in the case of the bitcoin system is pseudo-anonymous.
To ensure that a previous owner of a bitcoin did not double-spend the bitcoin (i.e., transfer ownership of the same bitcoin to two parties), the bitcoin system maintains a distributed ledger of transactions. With the distributed ledger, a ledger of all the transactions for a bitcoin is stored redundantly at multiple nodes (i.e., computers) of a blockchain network. The ledger at each node is stored as a blockchain. In a blockchain, the transactions are stored in the order that the transactions are received by the nodes. Each node in the blockchain network has a complete replica of the entire blockchain. The bitcoin system also implements techniques to ensure that each node will store the identical blockchain, even though nodes may receive transactions in different orderings. To verify that the transactions in a ledger stored at a node are correct, the blocks in the blockchain can be accessed from oldest to newest, generating a new hash of the block and comparing the new hash to the hash generated when the block was created. If the hashes are the same, then the transactions in the block are verified. The bitcoin system also implements techniques to ensure that it would be infeasible to change a transaction and regenerate the blockchain by employing a computationally expensive technique to generate a nonce that is added to the block when it is created. A bitcoin ledger is sometimes referred to as an Unspent Transaction Output (“UXTO”) set because it tracks the output of all transactions that have not yet been spent.
Although the bitcoin system has been very successful, it is limited to transactions in bitcoins or other cryptocurrencies. Efforts are currently underway to use blockchains to support transactions of any type, such as those relating to the sale of vehicles, sale of financial derivatives, sale of stock, payments on contracts, and so on. Such transactions use identity tokens, to uniquely identify something that can be owned or can own other things. An identity token for a physical or digital asset is generated using a cryptographic one-way hash of information that uniquely identifies the asset. Tokens also have an owner that uses an additional public/private key pair. The owner public key is set as the token owner identity, and when performing actions against tokens, ownership proof is established by providing a signature generated using the owner's private key and validated against the public key listed as the owner of the token. A person can be uniquely identified, for example, using a combination of a user name, social security number, and biometric (e.g., fingerprint). A product (e.g., refrigerator) can be uniquely identified, for example, using the name of its manufacturer and its seral number. The identity tokens for each would be a cryptographic one-way hash of such combinations. The identity token for an entity (e.g., person or company) may be the public key of a public/private key pair, where the private key is held by the entity. Identity tokens can be used to identify people, institutions, commodities, contracts, computer code, equities, derivatives, bonds, insurance, loans, documents, and so on. Identity tokens can also be used to identify collections of assets. An identity token for a collection may be a cryptographic one-way hash of the digital tokens of the assets in the collection. The creation of an identity token for an asset in a blockchain establishes provenance of the asset, and the identity token can be used in transactions (e.g., buying, selling, insuring) of the asset stored in a blockchain, creating a full audit trail of the transactions.
To record a simple transaction in a blockchain, each party and asset involved with the transaction needs an account (e.g., as a member of the blockchain system) that is identified by a digital token or in some blockchain system needs only a wallet with their private and public key pair. For example, when one person wants to transfer a car to another person, the current owner and next owner create accounts, and the current owner also creates an account that is uniquely identified by its vehicle identification number. The account for the car identifies the current owner. The current owner creates a transaction against the account for the car that indicates that the transaction is a transfer of ownership, indicates the public keys (i.e., identity tokens) of the current owner and the next owner, and indicates the identity token of the car. The transaction is signed by the private key of the current owner, and the transaction is evidence that the next owner is now the current owner.
To enable more complex transactions, some systems use “smart contracts.” A smart contract is computer code that implements transactions of a contract. The computer code may be executed in a secure platform (e.g., an Ethereum platform or a Hyperledger platform) that supports recording transactions in blockchains. In addition, the smart contract itself is recorded as a transaction in the blockchain using an identity token that is a hash (i.e., identity token) of the computer code so that the computer code that is executed can be authenticated. When deployed, a constructor of the smart contract executes, initializing the smart contract and its state. The state of a smart contract is stored persistently in the blockchain. When a transaction is recorded against a smart contract, a message is sent to the smart contract, and the computer code of the smart contract executes to implement the transaction (e.g., debit a certain amount from the balance of an account). The computer code ensures that all the terms of the contract are complied with before the transaction is recorded in the blockchain. For example, a smart contract may support the sale of an asset. The inputs to a smart contract to sell a car may be the identity tokens of the seller, the buyer, and the car, as well as the sale price in U.S. dollars. The computer code ensures that the seller is the current owner of the car and that the buyer has sufficient funds in their account. The computer code then records a transaction that transfers the ownership of the car to the buyer and a transaction that transfers the sale price from the buyer's account to the seller's account. If the seller's account is in U.S. dollars and the buyer's account is Canadian dollars, the computer code may retrieve a currency exchange rate, determine how many Canadian dollars the seller's account should be debited, and record the exchange rate. If either transaction is not successful, neither transaction is recorded.
When a message is sent to a smart contract to record a transaction, the message is sent to each node that maintains a replica of the blockchain. Each node executes the computer code of the smart contract to implement the transaction. For example, if 100 nodes each maintain a replica of a blockchain, then the computer code executes at each of the 100 nodes. When a node completes execution of the computer code, the result of the transaction is recorded in the blockchain. The nodes employ a consensus algorithm to decide on which transactions to keep and which transactions to discard. Although the execution of the computer code at each node helps ensure the authenticity of the blockchain, it requires large amounts of computer resources to support such redundant execution of computer code.
The term “contract” has been used to describe the computer code of a contract under the UXTO model of bitcoin and the computer code of the “smart contracts” model of the Ethereum platform. The “contracts” under these models are, however, different. In the UXTO model, the distributed ledger is a set of immutable rows keyed by (hash: output index) values. The “hash” is a hash of the transaction that generated the output represented by the row, and the “output index” identifies which one of the possibly many outputs of the transaction that the row represents. A UXTO contract is deterministic and performs no processing other than validating the inputs to the transaction. In the “smart contract” model, the computer code of the smart contract is an instantiation of the computer code that is maintained by every node that stores the blockchain. A “smart contract” can perform virtually any type of processing such as receiving messages, sending messages, accessing external databases, and so on.